From: Wei Liu Date: Fri, 28 Feb 2014 16:35:15 +0000 (+0100) Subject: mm: ensure useful progress in decrease_reservation X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5532 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=79de2d31f1ff8910231b7ec15519405953e6571a;p=xen.git mm: ensure useful progress in decrease_reservation During my fun time playing with balloon driver I found that hypervisor's preemption check kept decrease_reservation from doing any useful work for 32 bit guests, resulting in hanging the guests. As Andrew suggested, we can force the check to fail for the first iteration to ensure progress. We did this in d3a55d7d9 "x86/mm: Ensure useful progress in alloc_l2_table()" already. After this change I cannot see the hang caused by continuation logic anymore. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper Acked-by: Keir Fraser --- diff --git a/xen/common/memory.c b/xen/common/memory.c index 5a0efd57e2..9d0d32e326 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -268,7 +268,7 @@ static void decrease_reservation(struct memop_args *a) for ( i = a->nr_done; i < a->nr_extents; i++ ) { - if ( hypercall_preempt_check() ) + if ( hypercall_preempt_check() && i != a->nr_done ) { a->preempted = 1; goto out;